package day7;

import java.io.*;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class ObjGet {
    public static void main(String[] args) {
        try {
            ObjectInputStream oo=new ObjectInputStream(new FileInputStream("stu.obj"));
            Student o =(Student) oo.readObject();
            System.out.println(o);
            oo.close();//xml  json
//            Scanner in=new Scanner(System.in);
//            System.out.println("请输入新的地址:");
//            o.setAddr(in.next());
//            System.out.println(o);
//            //
//
//            ObjectOutputStream oin=new ObjectOutputStream(new FileOutputStream("stu.obj"));
//            oin.writeObject(o);
//            oin.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
